YNQ  YNQ-1.5.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
syopsyst.h
Go to the documentation of this file.
1 /*********************************************************************
2  *
3  * Copyright (c) 2021 by Visuality Systems, Ltd.
4  *
5  *********************************************************************
6  * FILE NAME : $Workfile:$
7  * ID : $Header:$
8  * REVISION : $Revision:$
9  *--------------------------------------------------------------------
10  * DESCRIPTION : OS-dependent definitions
11  * This file is expected to be modified during porting
12  *--------------------------------------------------------------------
13  * MODULE : Linux - SY
14  * DEPENDENCIES :
15  ********************************************************************/
16 
17 #ifndef _SYOPSYST_H_
18 #define _SYOPSYST_H_
19 
20 #include "sycommon.h"
21 #ifdef UD_NQ_CODEPAGEUTF8
22 #include <iconv.h>
23 #endif /* UD_NQ_CODEPAGEUTF8 */
24 
27 #define MUTEX_DEBUG
28 #undef MUTEX_DEBUG
29 
30 /* OS Name */
31 
32 #define SY_OSNAME "RedHat Linux"
34 #define syAssert(_stat_) assert(_stat_)
47 #define syGetTimeInSec() time(0)
53 NQ_TIME syGetTimeInMsec(void);
54 
61 
69  NQ_TIME * timeMsec
70  );
71 
78 NQ_INT
80  void
81  );
82 
88 void
90  NQ_UINT32 time,
91  SYTimeFragments* decomposed
92  );
93 
101  const SYTimeFragments* decomposed
102  );
103 
104 
105 #define sySleep(_secs_) sleep(_secs_)
106 #define syUSleep(_msecs_) usleep(_msecs_)
108 #if defined(CM_NQ_STORAGE) || defined(DOXYGEN)
109 
124 NQ_BOOL syGmtToString(NQ_BYTE * strTime, NQ_COUNT size, NQ_UINT32 t, const NQ_CHAR * fmt);
125 #endif
126 
139 #define SYThread pthread_t
140 #define syIsValidThread(_taskId_) TRUE
141 
142 #define syThreadGetCurrent pthread_self
143 
152 void syThreadStart(NQ_BOOL isRT, NQ_INT priorityLevel, SYThread *taskIdPtr, void (*startpoint)(void), NQ_BOOL background);
153 
154 #define syThreadDestroy(_taskId_) pthread_cancel(_taskId_);
155 
162 /* mutex */
163 
164 #ifndef MUTEX_DEBUG
165 #define SYMutex pthread_mutex_t
166 #else
167 typedef struct SYMutex
168 {
169  pthread_mutex_t mutex;
170  int lockCounter;
171  char who[3][120];
172  NQ_UINT where[3];
173 }_SYMutex;
174 #endif
175 
180 void syMutexCreate(SYMutex* _m);
181 
182 #if defined(MUTEX_DEBUG) || defined(DOXYGEN)
183 
184 /* Mutex functions - add prints per mutex create, take, give, destroy */
188 void syMutexDelete(SYMutex* _m);
189 
195 void syMutexTakeDebug(SYMutex *_m, const NQ_CHAR *text, const NQ_UINT line);
196 #define syMutexTake(_m) syMutexTakeDebug(_m, SY_LOG_FILE, SY_LOG_LINE)
197 
201 void syMutexGive(SYMutex* _m);
202 
203 #else
204 /* regular mutex operations */
205 #define syMutexDelete(_m) pthread_mutex_destroy(_m)
206 #define syMutexTake(_m) pthread_mutex_lock(_m)
207 #define syMutexGive(_m) pthread_mutex_unlock(_m)
208 #endif
209 
223 #define SY_SEMAPHORE_AVAILABLE
225 #if defined(SY_SEMAPHORE_AVAILABLE) || defined(DOXYGEN)
226 
227 #define SYSemaphore sem_t
235 NQ_STATUS
237  SYSemaphore* semId,
238  NQ_UINT count
239  );
240 
245 void
247  SYSemaphore* pSemID
248  );
249 
250 #define sySemaphoreDelete(_s) sem_destroy(&_s)
251 #define sySemaphoreTake(_s) sem_wait(&_s)
252 #define sySemaphoreGive(_s) sem_post(&_s)
253 
261 
262 #endif /* SY_SEMAPHORE_AVAILABLE */
263 
270 #if defined(UD_NQ_USETRANSPORTIPV6) || defined(DOXYGEN)
271 
272 #ifdef SY_LITTLEENDIANHOST
273 #define SY_LOCALHOSTIP4 /*{0, 0} */ {0x007f, 0x0100}
274 #define SY_LOCALHOSTIP6 {0, 0, 0, 0, 0, 0, 0, 0x0100} /* {0, 0, 0, 0, 0, 0, 0, 0} */
275 #define SY_LINKLOCALIP 0x80fe
276 #else /* SY_LITTLEENDIANHOST */
277 #define SY_LOCALHOSTIP4 /*{0, 0} */ {0x7f00 , 0x0001}
278 #define SY_LOCALHOSTIP6 {0, 0, 0, 0, 0, 0, 0, 1} /* {0, 0, 0, 0, 0, 0, 0, 0} */
279 #define SY_LINKLOCALIP 0xfe80
280 #endif /* SY_LITTLEENDIANHOST */
281 #define SY_ANYIP4 {0, 0}
282 #define SY_ANYIP6 {0, 0, 0, 0, 0, 0, 0, 0}
283 #define SY_ZEROIP {0, 0, 0, 0, 0, 0, 0, 0}
284 
285 #else /* UD_NQ_USETRANSPORTIPV6 */
286 
287 #ifdef SY_LITTLEENDIANHOST
288 #define SY_LOCALHOSTIP 0x0100007f
289 #else /* SY_LITTLEENDIANHOST */
290 #define SY_LOCALHOSTIP 0x7f000001
291 #endif /* SY_LITTLEENDIANHOST */
292 #define SY_ANYIP 0L
293 #define SY_ZEROIP 0L
294 
295 #endif /* UD_NQ_USETRANSPORTIPV6 */
296 
297 #define SY_ZEROIP4 0L
298 
299 #if defined(UD_NQ_USETRANSPORTIPV6) || defined(DOXYGEN)
300 
305 NQ_UINT32
307  const NQ_IPADDRESS6 ip
308  );
309 #endif /* UD_NQ_USETRANSPORTIPV6 */
310 
328 #define SY_INTERNALSOCKETPOOL
329 #undef SY_INTERNALSOCKETPOOL
330 
331 #define SYSocketHandle NQ_INT
332 #define SYSocketSet fd_set
333 #define syIsValidSocket(_sock) (_sock != ERROR)
334 
340 NQ_BOOL
342  SYSocketHandle sock
343  );
344 
345 #define syInvalidSocket() (ERROR)
346 #define syAddSocketToSet(_sock, _set) FD_SET((_sock), (_set))
347 #define syIsSocketSet(_sock, _set) FD_ISSET((_sock), (_set))
348 #define syClearSocketSet(_set) FD_ZERO((_set))
349 
355 #define syClearSocketFromSet(_sock, _set) FD_CLR((_sock), (_set))
356 
363 NQ_STATUS
365  SYSocketHandle sock
366  );
367 NQ_STATUS
374  SYSocketHandle sock
375  );
376 
383 NQ_STATUS
385  SYSocketHandle sock,
386  NQ_INT backlog
387  );
388 
397  NQ_BOOL stream,
398  NQ_UINT family
399  );
400 
409 NQ_STATUS
411  SYSocketHandle sock,
412  const NQ_IPADDRESS *ip,
413  NQ_PORT port,
414  NQ_BOOL reuseAddress
415  );
416 
422 NQ_STATUS
424  SYSocketHandle sock
425  );
426 
431 void
433  SYSocketHandle sock
434  );
435 
442 void
444  SYSocketHandle sock,
445  NQ_IPADDRESS *ip,
446  NQ_PORT *port
447  );
448 
458 NQ_INT
460  SYSocketHandle sock,
461  const NQ_BYTE* buf,
462  NQ_COUNT len,
463  const NQ_IPADDRESS *ip,
464  NQ_PORT port
465  );
466 
474 NQ_STATUS
476  SYSocketHandle sock,
477  const NQ_IPADDRESS *ip,
478  NQ_PORT port
479  );
480 
488 NQ_INT
490  SYSocketHandle sock,
491  const NQ_BYTE* buf,
492  NQ_COUNT len
493  );
494 
503 NQ_STATUS
505  SYSocketHandle sock,
506  const NQ_BYTE* buf,
507  NQ_COUNT len,
508  void (*releaseFunc)(const NQ_BYTE*)
509  );
510 
517 NQ_INT
519  SYSocketSet* pset,
520  NQ_UINT32 timeout
521  );
522 
532 NQ_INT
534  SYSocketHandle sock,
535  NQ_BYTE* buf,
536  NQ_COUNT len,
537  NQ_IPADDRESS* ip,
538  NQ_PORT* port
539  );
540 
548 NQ_INT
550  SYSocketHandle sock,
551  NQ_BYTE* buf,
552  NQ_COUNT len
553  );
554 
564 NQ_INT syRecvSocketWithTimeout(SYSocketHandle sock, NQ_BYTE * buf, unsigned int len, unsigned int secs);
565 
575  SYSocketHandle sock,
576  NQ_IPADDRESS* ip,
577  NQ_PORT* port
578  );
579 
580 #define sySetDatagramSocketOptions(_sock)
581 #define sySetStreamSocketOptions(_sock)
582 
593  SYSocketHandle socket,
594  const NQ_BYTE * buffer,
595  NQ_COUNT length,
596  const NQ_IPADDRESS *ip,
597  NQ_PORT port);
598 
609  const NQ_IPADDRESS *ip
610  );
611 
626 #define syGetPid() getpid()
627 
634  /*
635  Directories
636  -----------
637 
638  */
639 
640 #define SYDirectory DIR*
641 #define syInvalidateDirectory(_pd) *(_pd) = NULL
642 #define syIsValidDirectory(_d) (_d != NULL)
643 
649 NQ_STATUS
651  const NQ_WCHAR* name
652  );
653 
659 NQ_STATUS
661  const NQ_WCHAR* name
662  );
663 
671  const NQ_WCHAR* name
672  );
673 
681 NQ_STATUS
683  const NQ_WCHAR* name,
684  SYDirectory* pDir,
685  const NQ_WCHAR** fileName
686  );
687 
694 NQ_STATUS
696  SYDirectory dir,
697  const NQ_WCHAR** fileName
698  );
699 
705 NQ_STATUS
707  SYDirectory dir
708  );
709 
716 /*
717  Files
718  -----
719 
720  */
721 
722 #define SY_EXTENDFILENOTSUPPORTED
723 #undef SY_EXTENDFILENOTSUPPORTED
724 
725 #define SY_PATHSEPARATOR '/'
727 #define SYFile int
728 #define syInvalidateFile(_f) *_f = ERROR
729 #define syIsValidFile(_file) (_file!=ERROR)
730 #define syInvalidFile() (ERROR)
731 
732 
733 #define SY_CP_FIRSTILLEGALCHAR {0xe5}
734 #define SY_CP_ANYILLEGALCHAR {0x7c, 0x5c}
745 SYFile
747  const NQ_WCHAR* name,
748  NQ_BOOL denyread,
749  NQ_BOOL denyexecute,
750  NQ_BOOL denywrite
751  );
752 
758 NQ_STATUS
760  const NQ_WCHAR* name
761  );
762 
769 NQ_STATUS
771  const NQ_WCHAR* oldName,
772  const NQ_WCHAR* newName
773  );
774 
783 SYFile
785  const NQ_WCHAR* name,
786  NQ_BOOL denyread,
787  NQ_BOOL denyexecute,
788  NQ_BOOL denywrite
789  );
790 
799 SYFile
801  const NQ_WCHAR* name,
802  NQ_BOOL denyread,
803  NQ_BOOL denyexecute,
804  NQ_BOOL denywrite
805  );
806 
815 SYFile
817  const NQ_WCHAR* name,
818  NQ_BOOL denyread,
819  NQ_BOOL denyexecute,
820  NQ_BOOL denywrite
821  );
822 
830 NQ_STATUS
832  SYFile file,
833  NQ_UINT32 offLow,
834  NQ_UINT32 offHigh
835  );
836 
837 #define syFlushFile(_file) ((fsync(_file)==OK)? NQ_SUCCESS:NQ_FAIL)
838 
846 NQ_INT
847 syReadFile(
848  SYFile file,
849  NQ_BYTE* buf,
850  NQ_COUNT len
851  );
852 
860 NQ_INT
862  SYFile file,
863  const NQ_BYTE* buf,
864  NQ_COUNT len
865  );
866 
872 NQ_STATUS
874  SYFile fd
875  );
876 
884 NQ_UINT32
886  SYFile file,
887  NQ_INT32 off,
888  NQ_INT32 offHigh
889  );
890 
898 NQ_UINT32
900  SYFile file,
901  NQ_UINT32 off,
902  NQ_UINT32 offHigh
903  );
904 
912 NQ_UINT32
914  SYFile file,
915  NQ_INT32 off,
916  NQ_INT32 offHigh
917  );
918 
926 NQ_STATUS
928  SYFile file,
929  const NQ_WCHAR* fileName,
930  SYFileInformation* fileInfo
931  );
932 
939 NQ_STATUS
941  const NQ_WCHAR* fileName,
942  SYFileInformation* fileInfo
943  );
944 
951 NQ_STATUS
953  SYFile file,
954  NQ_UINT64 *size
955  );
956 
964 NQ_STATUS
966  const NQ_WCHAR* fileName,
967  SYFile handle,
968  const SYFileInformation* fileInfo
969  );
970 
977 NQ_STATUS
979  const NQ_WCHAR* name,
980  SYVolumeInformation *info
981  );
982 
983 #define syGetSecurityDescriptor(_f, _i, _b) udGetSecurityDescriptor(_f, _i, _b)
984 #define sySetSecurityDescriptor(_f, _i, _b, _l) udSetSecurityDescriptor(_f, _i, _b, _l)
992 #define syPrintf printf
993 #define syFprintf fprintf
994 #define sySprintf sprintf
995 #define sySnprintf snprintf
996 #define syVsnprintf vsnprintf
997 #define sySscanf sscanf
998 #define syScanf scanf
999 #define syGetchar getchar
1000 #define syFflush fflush
1001 
1015 #define syUnlockFile( \
1016  _file, \
1017  _offsetHigh, \
1018  _offsetLow, \
1019  _lengthHigh, \
1020  _lengthLow, \
1021  _timeout \
1022  ) ((_file==ERROR)? NQ_FAIL:NQ_SUCCESS)
1023 #define syLockFile( \
1024  _file, \
1025  _offsetHigh, \
1026  _offsetLow, \
1027  _lengthHigh, \
1028  _lengthLow, \
1029  _lockType, \
1030  _oplockLevel \
1031  ) ((_file==ERROR)? NQ_FAIL:NQ_SUCCESS)
1032 
1038 /*
1039  Networking
1040  ----------
1041 
1042  */
1043 
1044 #define syGetHostName(_name, _nameLen) gethostname((_name), (_nameLen))
1045 
1053  const char* name
1054  );
1055 
1056 #if defined(UD_NQ_USETRANSPORTIPV4) || defined(UD_NQ_USETRANSPORTIPV6) || defined(DOXYGEN)
1057 
1061 void
1063  NQ_CHAR *domain,
1064  NQ_IPADDRESS *server
1065  );
1066 #endif /* defined(UD_NQ_USETRANSPORTIPV4) || defined(UD_NQ_USETRANSPORTIPV6) */
1067 
1073 void
1075  NQ_IPADDRESS4 ip,
1076  NQ_BYTE* macBuffer
1077  );
1078 
1092 NQ_STATUS
1093 syGetAdapter(
1094  NQ_INDEX adapterIdx,
1095  NQ_INDEX * osIndex,
1096  NQ_IPADDRESS4* pIp,
1097  NQ_IPADDRESS6 *ip6,
1098  NQ_IPADDRESS4* pSubnet,
1099  NQ_IPADDRESS4* pBcast,
1100  NQ_WCHAR* pWins,
1101  NQ_WCHAR* pDns
1102  );
1103 
1106 #if defined(UD_CS_INCLUDEDIRECTTRANSFER) || defined(DOXYGEN)
1107 
1112 /*
1113  Socket-to-file-to-socket data transfer
1114  --------------------------------------
1115 
1116  */
1117 
1118 
1124 NQ_STATUS
1126  SYSocketHandle sock
1127  );
1128 
1131 void
1133  SYSocketHandle sock /* socket handle */
1134  );
1135 
1142 NQ_STATUS
1144  SYSocketHandle sock,
1145  SYFile file,
1146  NQ_COUNT * len
1147  );
1148 
1155 NQ_STATUS
1156 syDtToSocket(
1157  SYSocketHandle sock,
1158  SYFile file,
1159  NQ_COUNT * len
1160  );
1161 
1163 #endif /* UD_CS_INCLUDEDIRECTTRANSFER */
1164 
1169 #define SY_UNICODEFILESYSTEM
1170 #undef SY_UNICODEFILESYSTEM
1171 
1172 #if defined(UD_CC_INCLUDELDAP) || defined(UD_NQ_CODEPAGEUTF8) || defined(DOXYGEN)
1173 
1180 void
1182  NQ_CHAR *outStr,
1183  NQ_UINT outLength,
1184  const NQ_WCHAR *inWStr,
1185  NQ_UINT inLength
1186  );
1187 
1188 
1194 void
1196  NQ_WCHAR *outWStr,
1197  NQ_UINT outLength,
1198  const NQ_CHAR *inStr,
1199  NQ_UINT inLength
1200  );
1201 
1202 #endif /* defined(UD_CC_INCLUDELDAP) || defined(UD_NQ_CODEPAGEUTF8) */
1203 
1204 /*
1205  Using OS library for UTF 8
1206  --------------------------
1207 */
1208 #if defined(UD_NQ_CODEPAGEUTF8) || defined(DOXYGEN)
1209 
1214 
1215 #endif /* UD_NQ_CODEPAGEUTF8 */
1216 
1222 #define sySetRand() srand((unsigned int)time(0))
1223 #define syRand() rand()
1234 int
1236  int mode
1237  );
1238 
1243 NQ_UINT32
1245  void
1246  );
1247 
1251 void
1253  NQ_STATUS nqErr
1254  );
1255 
1258 #endif /* _SYOPSYST_H_ */
NQ_STATUS syGetFileInformation(SYFile file, const NQ_WCHAR *fileName, SYFileInformation *fileInfo)
NQ_UINT32 sySeekFileCurrent(SYFile file, NQ_INT32 off, NQ_INT32 offHigh)
NQ_UINT NQ_INDEX
Definition: udapi.h:31
long NQ_INT32
Definition: udapi.h:37
NQ_UINT16 NQ_IPADDRESS6[8]
Definition: udapi.h:50
NQ_STATUS syDeleteFile(const NQ_WCHAR *name)
NQ_STATUS syGetVolumeInformation(const NQ_WCHAR *name, SYVolumeInformation *info)
NQ_STATUS sySendMulticast(SYSocketHandle socket, const NQ_BYTE *buffer, NQ_COUNT length, const NQ_IPADDRESS *ip, NQ_PORT port)
NQ_BOOL syGmtToString(NQ_BYTE *strTime, NQ_COUNT size, NQ_UINT32 t, const NQ_CHAR *fmt)
void syDtEndPacket(SYSocketHandle sock)
unsigned int NQ_UINT
Definition: udapi.h:29
void sySemaphoreResetCounter(SYSemaphore *pSemID)
NQ_UINT32 syConvertTimeInMsecToSec(NQ_TIME *timeMsec)
NQ_STATUS sySendSocketAsync(SYSocketHandle sock, const NQ_BYTE *buf, NQ_COUNT len, void(*releaseFunc)(const NQ_BYTE *))
void syMutexGive(SYMutex *_m)
NQ_STATUS sySetFileInformation(const NQ_WCHAR *fileName, SYFile handle, const SYFileInformation *fileInfo)
#define SYMutex
Definition: syopsyst.h:165
NQ_STATUS syCreateDirectory(const NQ_WCHAR *name)
NQ_STATUS syShutdownSocket(SYSocketHandle sock)
NQ_INT syReadFile(SYFile file, NQ_BYTE *buf, NQ_COUNT len)
SYFile syOpenFileForRead(const NQ_WCHAR *name, NQ_BOOL denyread, NQ_BOOL denyexecute, NQ_BOOL denywrite)
NQ_INT sySemaphoreTimedTake(SYSemaphore *sem, NQ_INT timeout)
NQ_STATUS syGetFileSize(SYFile file, NQ_UINT64 *size)
NQ_STATUS syRenameFile(const NQ_WCHAR *oldName, const NQ_WCHAR *newName)
NQ_STATUS syListenSocket(SYSocketHandle sock, NQ_INT backlog)
NQ_INT sySelectSocket(SYSocketSet *pset, NQ_UINT32 timeout)
Definition: sycommon.h:95
NQ_UINT32 NQ_IPADDRESS4
Definition: udapi.h:49
NQ_INT syRecvSocket(SYSocketHandle sock, NQ_BYTE *buf, NQ_COUNT len)
NQ_BOOL initCodePageUTF8(void)
void sySetClientSocketOptions(SYSocketHandle sock)
NQ_STATUS syDtStartPacket(SYSocketHandle sock)
void syUTF8ToUnicodeN(NQ_WCHAR *outWStr, NQ_UINT outLength, const NQ_CHAR *inStr, NQ_UINT inLength)
#define SYSocketHandle
Definition: syopsyst.h:331
SYFile syOpenFileForWrite(const NQ_WCHAR *name, NQ_BOOL denyread, NQ_BOOL denyexecute, NQ_BOOL denywrite)
NQ_STATUS syConnectSocket(SYSocketHandle sock, const NQ_IPADDRESS *ip, NQ_PORT port)
Definition: sycommon.h:125
void syUnicodeToUTF8N(NQ_CHAR *outStr, NQ_UINT outLength, const NQ_WCHAR *inWStr, NQ_UINT inLength)
void syMutexCreate(SYMutex *_m)
NQ_INT syRecvSocketWithTimeout(SYSocketHandle sock, NQ_BYTE *buf, unsigned int len, unsigned int secs)
NQ_UINT32 syGetIPv6ScopeId(const NQ_IPADDRESS6 ip)
NQ_UINT16 NQ_PORT
Definition: udapi.h:48
NQ_BOOL syIsSocketAlive(SYSocketHandle sock)
NQ_STATUS syDtToSocket(SYSocketHandle sock, SYFile file, NQ_COUNT *len)
#define SYSocketSet
Definition: syopsyst.h:332
SYFile syOpenFileForReadWrite(const NQ_WCHAR *name, NQ_BOOL denyread, NQ_BOOL denyexecute, NQ_BOOL denywrite)
NQ_UINT NQ_COUNT
Definition: udapi.h:32
NQ_UINT16 NQ_WCHAR
Definition: udapi.h:45
NQ_UINT32 sySeekFileStart(SYFile file, NQ_UINT32 off, NQ_UINT32 offHigh)
NQ_UINT32 syComposeTime(const SYTimeFragments *decomposed)
void syGetDnsParams(NQ_CHAR *domain, NQ_IPADDRESS *server)
NQ_STATUS syCloseFile(SYFile fd)
SYSocketHandle syCreateSocket(NQ_BOOL stream, NQ_UINT family)
#define SYFile
Definition: syopsyst.h:727
#define SYSemaphore
Definition: syopsyst.h:227
unsigned char NQ_BYTE
Definition: udapi.h:27
NQ_STATUS syFirstDirectoryFile(const NQ_WCHAR *name, SYDirectory *pDir, const NQ_WCHAR **fileName)
Definition: sycommon.h:33
void syDecomposeTime(NQ_UINT32 time, SYTimeFragments *decomposed)
NQ_INT syWriteFile(SYFile file, const NQ_BYTE *buf, NQ_COUNT len)
NQ_UINT32 syGetLastSmbError(void)
void syGetSocketPortAndIP(SYSocketHandle sock, NQ_IPADDRESS *ip, NQ_PORT *port)
Definition: udapi.h:138
void sySetLastNqError(NQ_STATUS nqErr)
NQ_STATUS syGetAdapter(NQ_INDEX adapterIdx, NQ_INDEX *osIndex, NQ_IPADDRESS4 *pIp, NQ_IPADDRESS6 *ip6, NQ_IPADDRESS4 *pSubnet, NQ_IPADDRESS4 *pBcast, NQ_WCHAR *pWins, NQ_WCHAR *pDns)
void syMutexDelete(SYMutex *_m)
Definition: udapi.h:69
NQ_TIME syConvertTimeSpecToTimeInMsec(void *val)
int NQ_INT
Definition: udapi.h:28
NQ_INT sySendToSocket(SYSocketHandle sock, const NQ_BYTE *buf, NQ_COUNT len, const NQ_IPADDRESS *ip, NQ_PORT port)
NQ_STATUS syAllowBroadcastsSocket(SYSocketHandle sock)
int syUnixMode2DosAttr(int mode)
NQ_STATUS syCloseSocket(SYSocketHandle sock)
NQ_STATUS syGetFileInformationByName(const NQ_WCHAR *fileName, SYFileInformation *fileInfo)
void syGetMacAddress(NQ_IPADDRESS4 ip, NQ_BYTE *macBuffer)
SYSocketHandle syAcceptSocket(SYSocketHandle sock, NQ_IPADDRESS *ip, NQ_PORT *port)
NQ_INT syGetTimeZone(void)
int NQ_BOOL
Definition: udapi.h:30
void sySubscribeToMulticast(SYSocketHandle socket, const NQ_IPADDRESS *ip)
SYDirectory syOpenDirectory(const NQ_WCHAR *name)
void syMutexTakeDebug(SYMutex *_m, const NQ_CHAR *text, const NQ_UINT line)
NQ_STATUS syTruncateFile(SYFile file, NQ_UINT32 offLow, NQ_UINT32 offHigh)
NQ_UINT32 sySeekFileEnd(SYFile file, NQ_INT32 off, NQ_INT32 offHigh)
NQ_STATUS syBindSocket(SYSocketHandle sock, const NQ_IPADDRESS *ip, NQ_PORT port, NQ_BOOL reuseAddress)
NQ_STATUS syNextDirectoryFile(SYDirectory dir, const NQ_WCHAR **fileName)
#define SYThread
Definition: syopsyst.h:139
NQ_STATUS syDeleteDirectory(const NQ_WCHAR *name)
char NQ_CHAR
Definition: udapi.h:26
NQ_INT sySendSocket(SYSocketHandle sock, const NQ_BYTE *buf, NQ_COUNT len)
NQ_STATUS sySemaphoreCreate(SYSemaphore *semId, NQ_UINT count)
unsigned long NQ_UINT32
Definition: udapi.h:43
void syThreadStart(NQ_BOOL isRT, NQ_INT priorityLevel, SYThread *taskIdPtr, void(*startpoint)(void), NQ_BOOL background)
NQ_STATUS syDtFromSocket(SYSocketHandle sock, SYFile file, NQ_COUNT *len)
NQ_STATUS syCloseDirectory(SYDirectory dir)
#define SYDirectory
Definition: syopsyst.h:640
NQ_IPADDRESS4 syGetHostByName(const char *name)
SYFile syCreateFile(const NQ_WCHAR *name, NQ_BOOL denyread, NQ_BOOL denyexecute, NQ_BOOL denywrite)
NQ_INT syRecvFromSocket(SYSocketHandle sock, NQ_BYTE *buf, NQ_COUNT len, NQ_IPADDRESS *ip, NQ_PORT *port)
NQ_INT NQ_STATUS
Definition: udapi.h:47